﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExpressHelps
{
    // 抽象观察者（Observer）
    public interface ITaskObserver
    {
        void Update(Task task);
    }

    // 具体观察者（ConcreteObserver） - 任务接收者
    public class TaskReceiver : ITaskObserver
    {
        private string name;

        public TaskReceiver(string name)
        {
            this.name = name;
        }

        public void Update(Task task)
        {
            //Console.WriteLine($"{name} received an update: Task '{task.Description}' is now in status '{task.Status}'");
        }
    }
}
